<template>
  <el-dialog v-model="dialog.visible" title="去处理-积分不足" width="40%" @close="handleCloseDialog">
    <span class="v-middle">积分不足，请</span>
    <el-button link type="primary" @click="handleCharge" class="v-middle">
      充值
    </el-button>
    <template #footer>
      <div class="dialog-footer">
        <el-button @click="handleCloseDialog">取 消</el-button>
      </div>
    </template>
  </el-dialog>
</template>
<script setup lang="ts">
// 定义 emit，用于通知外部关闭事件
import router from "@/router";

const emit = defineEmits(["update:modelValue", "loadData"]);

const dialog = reactive({
  title: "",
  visible: false,
});
const defaultFormData = {

};
const formData = ref({
  ...defaultFormData,
});


async function handleSubmit() {

}
async function handleCharge() {
  router.push({ name: "recharge" });
}

// 关闭弹窗
function handleCloseDialog() {
  dialog.visible = false;
  Object.assign(formData.value, defaultFormData);
  emit("update:modelValue", false); // 关闭弹窗
}
function showModal(val) {
  dialog.visible = true;
}

defineExpose({
  showModal,
});
</script>
<style style="scss" scoped>

</style>
